<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">


<ui:composition template="/templates/fornecedor.xhtml">

	<ui:define name="menu">
		<ui:include src="/fornecedor/menu.xhtml" />
	</ui:define>

	<ui:define name="conteudo">
		<div id="texto">

			<h2>Cadastro de Cliente Pessoa Juridica (PJ)</h2>
		</div>

		<h:form id="form">
			<p:growl id="growl" showDetail="false" />

			<h:inputHidden value="#{clienteBeanPJ.clientePJ.idCliente}" />

			<p:accordionPanel>
				<p:tab title="Dados do cliente">
					<p:fieldset>

						<div style="padding-left: 30px; float: left; margin-top: 10px;">							

								<h:panelGrid columns="2">
									<h:outputLabel value="Razão social : * " for="razaosocial"
										style="font-weight:bold" />
									<p:inputText id="razaosocial" label="razaosocial"
										value="#{clienteBeanPJ.clientePJ.razaosocial}" required="true"
										requiredMessage="Informe o seu CNPJ" size="50"
										style="heght:30px;" />
									<span id="erro"> <h:message for="cpfCnpj" /></span>
								</h:panelGrid>

								<h:panelGrid columns="2">
									<h:outputLabel value="CNPJ : * " for="cpfCnpj"
										style="font-weight:bold" />
									<p:inputText id="cpfCnpj" label="CNPJ"
										value="#{clienteBeanPJ.clientePJ.cpfCnpj}" required="true"
										requiredMessage="Informe o seu CNPJ" size="58"
										style="heght:13px;" />
									<span id="erro"> <h:message for="cpfCnpj" /></span>
								</h:panelGrid>

								<h:panelGrid columns="3">
									<h:outputLabel value="Número da carteira de habilitacao : * "
										for="nroHab" style="font-weight:bold" />
									<p:inputText id="nroHab" label="Numero da habilitacao"
										value="#{clienteBeanPJ.clientePJ.nroHab}" required="true"
										requiredMessage="Informe o seu numero da habilitacao"
										size="27" style="heght:30px;" />
									<span id="erro"> <h:message for="nroHab" /></span>
								</h:panelGrid>

								<h:panelGrid columns="4">
									<h:outputLabel value="Endereco : * " for="endereco"
										style="font-weight:bold" />
									<p:inputText id="endereco" label="endereco"
										value="#{clienteBeanPJ.clientePJ.endereco}" required="true"
										requiredMessage="Informe o seu endereco" size="53"
										style="heght:30px;" />
									<span id="erro"> <h:message for="endereco" /></span>
								</h:panelGrid>

								<h:panelGrid columns="4">
									<h:outputLabel value="Email: * " for="email"
										style="font-weight:bold" />
									<p:inputText id="email" label="email"
										value="#{clienteBeanPJ.clientePJ.email}" required="true"
										requiredMessage="Informe e-mail" size="58" style="heght:30px;" />
									<span id="erro"> <h:message for="email" /></span>
								</h:panelGrid>


								<h:panelGrid columns="4">
									<h:outputLabel value="Carteira de habilitação: * " for="catHab"
										style="font-weight:bold" />
									<p:inputText id="catHab" label="catHab"
										value="#{clienteBeanPJ.clientePJ.catHab}" required="true"
										requiredMessage="Informe carteira de hobilitação" size="40"
										style="heght:30px;" />
									<span id="erro"> <h:message for="endereco" /></span>
								</h:panelGrid>

								<h:panelGrid columns="4">
									<h:outputLabel value="Estado Emissor : * " for="estadoEmissor"
										style="font-weight:bold" />
									<p:inputText id="estadoEmissor" label="estadoEmissor"
										value="#{clienteBeanPJ.clientePJ.estadoEmissor}"
										required="true" requiredMessage="Informe o seu endereco"
										size="48" style="heght:30px;" />
									<span id="erro"> <h:message for="endereco" /></span>
								</h:panelGrid>


								<h:panelGrid columns="4">
									<h:outputLabel value="Passaporte: * " for="passaporte"
										style="font-weight:bold" />
									<p:inputText id="passaporte" label="passaporte"
										value="#{clienteBeanPJ.clientePJ.passaporte}" required="true"
										requiredMessage="Informe passaporte" size="53"
										style="heght:30px;" />
									<span id="erro"> <h:message for="email" /></span>
								</h:panelGrid>

								<h:panelGrid columns="4">
									<h:outputLabel value="Telefone: * " for="telefone"
										style="font-weight:bold" />
									<p:inputText id="telefone" label="telefone"
										value="#{clienteBeanPJ.clientePJ.telefone}" required="true"
										requiredMessage="Informe telefone" size="55"
										style="heght:30px;" />
									<span id="erro"> <h:message for="email" /></span>
								</h:panelGrid>
							
						</div>

					</p:fieldset>
				</p:tab>

			</p:accordionPanel>
			<br></br>


			<h:panelGroup>
				<h:commandButton value="Salvar" action="#{clienteBeanPJ.salvar}"
					style="height: 30px;" />
			</h:panelGroup>
		</h:form>

	</ui:define>
</ui:composition>
</html>